package com.myzl.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;


/**
 *@ClassName: CommunicationProtocolEnum
 *@Author: wzb
 *@Date: 2022/12/1 13:45
 *@Description:
 */
@Getter
@AllArgsConstructor
public enum CommunicationProtocolEnum {

    TCP(1),
    UDP(2),
    HTTP(3),
    WEBSOCKET(4),
    RTSP(5),
    RFID(6)
    ;

    private final Integer code;

    public static CommunicationProtocolEnum getValue(int value){
        for(CommunicationProtocolEnum x:values()){
            if(x.getCode()==value){
                return x;
            }
        }
        return null;
    }

}
